<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script src="./Promise.js"></script>
  <script>
    let p = new Promise((resolve, reject) => {
      resolve('OKOKOK');
      // reject('Error');
    });

    let result = p.then(
      value => {
        // console.log(value);
        // return 123;
        return new Promise((resolve, reject) => {
          resolve('Yes Yes');
          // reject('Error');
        })
        // throw '出问题啦~~';
      }, 
      reason => {
        // console.warn(reason);
        // return '天青色等烟雨';
        return new Promise((resolve, reject) => {
          resolve('OK');
        });
        // throw '天有点凉了~~';
      });

    console.log(result);
  </script>
</body>

</html>